using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using DevExpress.Web.ASPxNavBar;

namespace Indeco.G24.Website.UserControls
{
    public partial class BangGiaSanPham : System.Web.UI.UserControl
    {
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void navBarDiaBanActive_GroupDataBound(object source, NavBarGroupEventArgs e)
        {
            SiteMapNode siteMapNode = (e.Group.DataItem as IHierarchyData).Item as SiteMapNode;
            Control ucContentTemplate = LoadControl("~/UserControls/ListNhaCungCap.ascx");
            e.Group.ContentTemplate = ucContentTemplate as ITemplate;
            DataBindContentUserControl(siteMapNode, ucContentTemplate);
        }
        protected void DataBindContentUserControl(SiteMapNode siteMapNode, Control userControl)
        {
            SiteMapDataSource siteMapNhaCungCap = userControl.FindControl("ProvinceSiteMapDataSourceNhaCungCap") as SiteMapDataSource;
            siteMapNhaCungCap.StartingNodeUrl = siteMapNode.Key;
        }              
    }
}